package com.huawei.appmarket.service.infoflow.card;

import android.content.Context;
import androidx.databinding.ViewDataBinding;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.infoflow.bean.InfoFlowAppVideoCardBean;
import com.huawei.appmarket.service.infoflow.cards.card.BaseInfoFlowCard;
import o.dof;
import o.epv;
import o.eqx;
import o.evp.b;
import o.evt;
import o.ewm.j;
import o.ewp;

public class InfoFlowAppVideoCard extends BaseInfoFlowCard<ewp> {
    public /* synthetic */ void ˊ(ViewDataBinding viewDataBinding) {
        ˋ((ewp) viewDataBinding);
    }

    public InfoFlowAppVideoCard(Context context) {
        super(context);
    }

    public void ˋ(ewp o_ewp) {
        super.ˊ(o_ewp);
        int ʼ = (int) (((float) this.ˋ) * epv.ʼ());
        ((ewp) ʾ()).ˏ.getLayoutParams().height = ʼ;
        ((ewp) ʾ()).ʼ.getLayoutParams().height = ʼ;
        ˏ(((ewp) ʾ()).ॱॱ);
        ((ewp) ʾ()).ॱॱ.setClickable(false);
        ॱ(((ewp) ʾ()).ॱ);
        ˊ(((ewp) ʾ()).ˋ);
        ˋ(((ewp) ʾ()).ʻ);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof InfoFlowAppVideoCardBean) {
            InfoFlowAppVideoCardBean infoFlowAppVideoCardBean = (InfoFlowAppVideoCardBean) cardBean;
            if (dof.ˋ(infoFlowAppVideoCardBean.ˊ())) {
                ((ewp) ʾ()).ʼ.setVisibility(4);
                ((ewp) ʾ()).ˏ.setVisibility(0);
                eqx.ˏ(((ewp) ʾ()).ˏ, infoFlowAppVideoCardBean.ॱ(), "image_default_icon");
            } else {
                ((ewp) ʾ()).ʼ.setVisibility(0);
                ((ewp) ʾ()).ˏ.setVisibility(4);
                ˊ(infoFlowAppVideoCardBean);
            }
            this.ˉ.setText(infoFlowAppVideoCardBean.ˏˏ());
            if (infoFlowAppVideoCardBean.ٴ() != 0) {
                ((ewp) ʾ()).ᐝ.setVisibility(0);
                eqx.ˎ(((ewp) ʾ()).ᐝ, infoFlowAppVideoCardBean.ՙ());
                this.ˉ.setText(infoFlowAppVideoCardBean.ߴ());
            } else {
                ((ewp) ʾ()).ᐝ.setVisibility(8);
            }
            ˋ(((ewp) ʾ()).ʽ, infoFlowAppVideoCardBean.ˋʻ());
            ᐝ(this.ˉ);
        }
    }

    private void ˊ(InfoFlowAppVideoCardBean infoFlowAppVideoCardBean) {
        int i = j.ʿˈ;
        int i2 = j.ʿʿ;
        String str = (String) this.ˊˋ.getTag(i);
        String str2 = (String) this.ˊˋ.getTag(i2);
        if (!dof.ˋ(str) && str.equals(infoFlowAppVideoCardBean.ˊ())) {
            return;
        }
        if (dof.ˋ(str2) || !str2.equals(infoFlowAppVideoCardBean.ॱ())) {
            str2 = infoFlowAppVideoCardBean.ॱ();
            String ˊ = infoFlowAppVideoCardBean.ˊ();
            this.ˊˋ.setTag(i, ˊ);
            this.ˊˋ.setTag(i2, str2);
            if (((ewp) ʾ()).ʼ != null) {
                ((ewp) ʾ()).ʼ.setVideoBaseInfo(new b().ˎ(infoFlowAppVideoCardBean.ʽ()).ˊ(str2).ˋ(ˊ).ˏ(infoFlowAppVideoCardBean.ͺˏ()).ॱ(infoFlowAppVideoCardBean.u_()).ʼ(infoFlowAppVideoCardBean.ᶥ()).ᐝ(infoFlowAppVideoCardBean.ꜞ()).ʻ(evt.ˏ(infoFlowAppVideoCardBean.sp_)).ॱॱ(infoFlowAppVideoCardBean.ॱـ()).ॱ());
                eqx.ˏ(((ewp) ʾ()).ʼ.ॱॱ(), str2, "image_default_icon");
            }
        }
    }

    public void w_() {
        eqx.ˏ(this.ʽॱ, this.ˊᐝ.ॱˌ(), "app_default_icon");
    }
}
